<template>
    <div class="container">
        <!--<div class="button">
            <a type="primary" class="yd-btn yd-btn-primary" href="./">开通MT5账号</a>
        </div>-->
        <div class="con" v-if="myMT5Info">
            <yd-preview v-for="(item, key) in myMT5Info" :buttons="btns">
                <yd-preview-header>
                    <div slot="left">MT5账号</div>
                    <div slot="right">{{item.mt5Account}}</div>
                </yd-preview-header>

                <yd-preview-item>
                    <div slot="left">创建时间</div>
                    <div slot="right">{{item.createTime}}</div>
                </yd-preview-item>
                <yd-preview-item>
                    <div slot="left">状态</div>
                    <div slot="right">{{item.state==4?'锁定':'正常'}}</div>
                </yd-preview-item>
                <!--<yd-preview-item>
                    <div slot="left"></div>
                    <div slot="right" style="color: #009688;" @click="resetPw(item.mt5Account)">重置密码</div>
                </yd-preview-item>-->
            </yd-preview>
        </div>
    </div>
</template>
<script>

    import AjaxHttp from '../../js/ajaxHttp.js';
    import Tools from '../../js/tools.js';
    import Config from '../../js/config.js';
    export default{
        data: function () {
            return {
                btns: [
                    /*{
                     color: '#009688',
                     text: '重置密码',
                     click: function (item, key) {
                     console.log(item, key);
                     //Tools.goHref('./resetPw.html', 10, 53, 'mt5Account=');
                     }
                     }*/
                ],
                myMT5Info: ''
            }
        },
        created: function () {
            var _this = this;
            AjaxHttp.getHttp('fxsys/mtApply/index').then(function (response) {
                console.log(response);
                _this.myMT5Info = response.mt5InitVOList;
            });
        },
        methods: {
            resetPw: function (mt5Account) {
                console.log(mt5Account);
                Tools.goHref('./resetPw.html', 10, 53, 'mt5Account=' + mt5Account);
            }
        }
    }
</script>